package com.tenement.service.interfaces;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import com.tenement.mybatis.entity.User;

public interface IUserService {

	/**
	 * 判断邮箱是否已经被占用了
	 * 
	 * @param email
	 * @return
	 */
	boolean verifyEmailUsed(String email);

	/**
	 * 修改用户的邮箱,邮箱，uId
	 * 
	 * @param user
	 */
	void modifyUserEmail(User user,HttpServletRequest request);

	/**
	 * 用户注册
	 * 
	 * @param user
	 * @return
	 */
	boolean userReister(User user);

	/**
	 * 修改用户密码，通过用户邮箱
	 * 
	 * @param email
	 * @param pwd
	 * @return
	 */
	boolean modifyPwd(String uId, String pwd);

	/**
	 * 邮箱登录
	 * 
	 * @param user
	 * @return
	 */
	String userLoginByEmail(User user, HttpServletRequest request);

	/**
	 * 手机号登录
	 * 
	 * @param user
	 * @return
	 */
	String userLoginByPhone(User user, HttpServletRequest request);

	/**
	 * 判断手机号是否已经被注册
	 * 
	 * @param uTelephone
	 * @return
	 */
	boolean verifyPhoneUsed(String uTelephone);

	/**
	 * 修改用户手机号
	 * 
	 * @param user
	 */
	void modifyUserPhone(User user,HttpServletRequest request);

	/**
	 * 修改用户普通信息，用户头像好用户昵称
	 * 
	 * @param user
	 * @return
	 */
	boolean modifyUserMsg(User user,HttpServletRequest request);

	/**
	 * 获取用户信息列表，管理员操作
	 * 
	 * @return
	 */
	List<User> getUserList();
	
	boolean deleteUserByKey(int uId);

}
